/**
  * 封装了nodejs 的mysql工具包，并加入了promise
  * @module 数据库连接
 * @author 徐灿
 * @date 2018-7-26
  */


const mysql = require('mysql');
const configs = require('../../../../Config').MySql.meter;
let pool = mysql.createPool({
    host: configs.host,
    port: configs.port,
    user: configs.user,
    password: configs.password,
    database: configs.database,
    connectionLimit: configs.connectionLimit,
    debug: configs.dbDebug,
    multipleStatements: configs.multipleStatements
});

exports.pool = pool;
